#!/bin/bash

# ----------------------------------------------------------------------
# Filename:   ciphers.sh
# Version:    1.0
# Date:       2013/12/05
# Author:     huijing.hei
# Email:      huijing.hei@cs2c.com.cn
# Summary:    03系统安全功能-06OpenSSL-02查看加密算法
# Notes:       ***
# Copyright:    China Standard Software Co., Ltd.
# History：     
#             Version 1.0, 2013/12/05
#             - openssl ciphers
# ----------------------------------------------------------------------
##! @TODO: setup
##! @AUTHOR: huijing.hei
##! @VERSION: 1.0 
##! @OUT: 0 => success; 1 => failure

function DoSetup()
{
    # check user is root
    IsRoot
    EchoResult "check user is root"

    CmdCheck openssl

}

##! @TODO: openssl version
##! @AUTHOR: huijing.hei
##! @VERSION: 1.0 
##! @OUT: 0 => success; 1 => failure

function DoTest()
{

    # version
    openssl ciphers
    EchoResult "openssl ciphers"

}


# include lib files

if [ -z "$SFROOT" ]
then
    echo "SFROOT is null, pls check"
    exit 1
fi

. ${SFROOT}/lib/Echo.sh
. ${SFROOT}/lib/Check.sh
. ${SFROOT}/lib/UserOps.sh

export LANG=C

DoSetup
DoTest
echo ""
